package ${sourceBasePackage}.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;


/**
 * ${description}(${entityName})查询DTO类
 *
 * @author ${author}
 * @since ${createDate}
 */
@ApiModel(description = "${description}SearchDTO")
public class ${entityName}SearchDto implements Serializable {

	private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "当前页数")
	private Integer page;
	@ApiModelProperty(value = "每页行数")
	private Integer rows;

	<#list searchFields as po>
    <#if po.listQuery == 'interval' || po.listQuery == 'between'>
    /**
     * ${po.description}开始
     */
    @ApiModelProperty("${po.description}开始")
    <#if po.propertyType == 'Date'>
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    </#if>
    private ${po.propertyType} ${po.propertyName}Start;
    /**
     * ${po.description}结束
     */
    @ApiModelProperty("${po.description}结束")
    <#if po.propertyType == 'Date'>
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    </#if>
    private ${po.propertyType} ${po.propertyName}End;
    <#else>
    /**
    * ${po.description}
    */
    @ApiModelProperty(value = "${po.description}")
    <#if po.propertyType == 'Date'>
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    </#if>
    private ${po.propertyType} ${po.propertyName};
    </#if>
    </#list>

    public Integer getPage() {
        return page;
    }
    public void setPage(Integer page) {
        this.page = page;
    }
    public Integer getRows() {
        return rows;
    }
    public void setRows(Integer rows) {
        this.rows = rows;
    }

	<#list searchFields as po>
    <#if po.listQuery == 'interval' || po.listQuery == 'between'>
    public ${po.propertyType} get${po.propertyName?cap_first}Start() {
        return ${po.propertyName}Start;
    }
    public void set${po.propertyName?cap_first}Start(${po.propertyType} ${po.propertyName}Start) {
        this.${po.propertyName}Start = ${po.propertyName}Start;
    }
    public ${po.propertyType} get${po.propertyName?cap_first}End() {
        return ${po.propertyName}End;
    }
    public void set${po.propertyName?cap_first}End(${po.propertyType} ${po.propertyName}End) {
        this.${po.propertyName}End = ${po.propertyName}End;
    }
    <#else>
    public ${po.propertyType} get${po.propertyName?cap_first}() {
        return ${po.propertyName};
    }
    public void set${po.propertyName?cap_first}(${po.propertyType} ${po.propertyName}) {
        this.${po.propertyName} = ${po.propertyName};
    }
    </#if>
    </#list>
}
